import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

export const routes: Array<RouteRecordRaw> = [
    {
        path: "/",
        name: "Login",
        component: () => import("@/pages/login/LoginView.vue"),
        meta: {
            title: "登录",
            absolutePath: "/",
        },
    },
    {
        path: "/home",
        name: "Home",
        component: () => import("@/pages/home/HomeView.vue"),
    },
    {
        path: "/search",
        name: "Search",
        component: () => import("@/pages/search/SearchView.vue"),
        meta: {
            title: "搜索",
            absolutePath: "/search",
        },
    },
    {
        path: "/cart",
        name: "Cart",
        component: () => import("@/pages/cart/CartView.vue"),
        meta: {
            title: "购物车",
            absolutePath: "/cart",
        },
    },
    {
        path: "/settlement",
        name: "Settlement",
        component: () => import("@/pages/cart/SettlementView.vue"),
        meta: {
            title: "结算",
            absolutePath: "/settlement",
        },
    },
];
const router = createRouter({
    history: createWebHistory(),
    routes: routes as RouteRecordRaw[],
});
export default router;